<div class="invest-balance">
  <div class="index-top">
    <div class="back" routerLink="/indexMy">
      <img src="../../../assets/icons/back2.png" alt="">
    </div>
    <p>{{ 'websiteRedeploy.html1' | translate }}</p>
  </div>

  <div class="invest-balance-body">
    <form [formGroup]="investForm" (ngSubmit)="toPay(investForm)">
      <div class="invest">
        <div class="cash" *ngIf="radioType.id == 0">
          <div class="weui-cell weui-cell_vcode">
            <div class="weui-cell__bd">
              <input class="weui-input" type="number" placeholder="{{'InvestBalance-Page.html1' | translate}}"
                formControlName="amount" name="amount" />
            </div>
            <div class="weui-cell__ft" *ngIf='!investForm.controls.amount.valid && investForm.controls.amount.dirty'>
              <i style="width: 2rem;margin-left: 1rem;" class="weui-icon-warn"></i></div>
          </div>
          <p>Jpoint</p>
        </div>
        <p *ngIf="radioType.id != 0" style="text-align: center;">
          <font >1 {{coinName}} = {{rate}} {{radioType.cash | getstatus2 : lang}}</font>
        </p>
        <p *ngIf="radioType.id == 0">
          <font > = {{investForm.value.amount || 0}} {{radioType.cash | getstatus2 : lang}}</font>
        </p>
      </div>
    </form>

    <div class="invest-radio">
      <div class="weui-cells_radio">
        <label class="weui-cell weui-check__label" for="radio-{{ i.id }}" *ngFor="let i of radio">
          <div class="weui-cell__bd" style="display: flex;" (click)="selCash(i)">
            <img style="width: 3rem;height: 3rem;" src="{{i.img}}" alt="">
            <p style="margin-left: .5rem;">{{ i.coinName }}</p>
          </div>
          <div class="weui-cell__ft">
            <input type="radio" class="weui-check" [(ngModel)]="radioType" name="radio1" [value]="i"
              id="radio-{{ i.id }}" />
            <span class="weui-icon-checked"></span>
          </div>
        </label>
      </div>
    </div>

    <div class="subbtn">
      <button weui-button disabled='{{!investForm.valid}}' (click)='toPay(investForm)'>{{ 'websiteRedeploy.html12' | translate }}</button>
    </div>
  </div>
  
  <div class="fixed-box" *ngIf="dialogShow">
    <div class="pay-sure-box" *ngIf="!isError">
      <!-- <i class="icon-close" (click)="onOutsize(false)">╳</i> -->
      <img src="../../../assets/images/invest-page/ok.png" alt="">
      <h3>{{ 'websiteRedeploy.html19' | translate }}</h3>
      <div class="btn" routerLink="/indexMy">
        <a >{{ 'websiteRedeploy.html20' | translate }}</a>
      </div>
    </div>
    <div class="pay-sure-box" *ngIf="isError">
      <!-- <i class="icon-close" (click)="onOutsize(false)">╳</i> -->
      <img src="../../../assets/images/invest-page/error.png" alt="">
      <h3 style="color:#FA483B">{{ 'websiteRedeploy.html21' | translate }}</h3>
      <p>{{ 'websiteRedeploy.html22' | translate }}</p>
      <div class="btn" routerLink="/indexMy">
        <a>{{ 'websiteRedeploy.html20' | translate }}</a>
      </div>
    </div>
  </div>

  <div class="fixed-box" *ngIf="showUsdtPay">
    <div class="erweima">
      <div class="top">
        <h1>USDT{{ 'websiteRedeploy.html22' | translate }}</h1>
        <div (click)='cloesUsdtPay()'><img src="../../../assets/icons/closeIcon.png" alt=""></div>
      </div>
      <div class="erweima-pic">
        <ngx-qrcode qrc-size='10' id="qrCodeImage" qrc-element-type="url" qrc-class="aclass" qrc-padding="1"
          qrc-errorCorrectionLevel="H" [qrc-value]="address"></ngx-qrcode>
      </div>
      <p>{{ 'websiteRedeploy.html24' | translate }}：<span id="address">{{address}}</span> </p>
      <a (click)="copyaddress()">{{ 'websiteRedeploy.html23' | translate }}</a>
    </div>
  </div>
</div>